package cn.com.sparkle.paxos.net.netlayer.netty;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Properties;

public class Conf {
	private int iothreadnum;
	private int workthreadNum;

	public Conf(String path) throws FileNotFoundException, IOException {
		Properties prop = new Properties();
		prop.load(new InputStreamReader(new FileInputStream(path)));
		iothreadnum = Integer.parseInt(prop.getProperty("io_thread_num"));
		workthreadNum = Integer.parseInt(prop.getProperty("worker_thread_num"));
	}

	public int getIothreadnum() {
		return iothreadnum;
	}

	public int getWorkthreadNum() {
		return workthreadNum;
	}

}
